<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<script type="text/javascript" src="jquery/jquery-1.10.2.js"></script>
<script type="text/javascript" src="md5/md5.js"></script>
	<style type="text/css">
	</style>
	<script type="text/javascript">
		$(document).ready(function(){
			$("#submit").click(function(){
				doJsonAjax("POST","/open/todo/send?access_token=19d6eb16805c163e5550ffad523bee4e");
			});
			init();
		});
		function init(){
			var parm={todoMsgs:[
			                    {"bussId":"00001","descrip":"描述测试一下","event":"1","eventBody":"rapidView=5&selectedIssue=PLATFORM-1300","method":"3","msgCode":"c_0002","time":"2014-11-19 10:15:20","toOpenIds":"000145a7b95b5901,000145a7b9d40a05"},
			                    {"bussId":"00002","descrip":"描述测试一下","event":"1","eventBody":"rapidView=5&selectedIssue=PLATFORM-1300","method":"3","msgCode":"c_0002","time":"2014-11-19 10:15:20","toOpenIds":"000145a7b95b5901,000145a7b9d40a05"},
			                    {"bussId":"00003","descrip":"描述测试一下","event":"1","eventBody":"rapidView=5&selectedIssue=PLATFORM-1300","method":"3","msgCode":"c_0002","time":"2014-11-19 10:15:20","toOpenIds":"000145a7b95b5901,000145a7b9d40a05"}
			                    ]};
			jQuery("#parmTextarea").val(JSON.stringify(parm));
			
		}
		function doJsonAjax(method,url){
			$.ajax({
				url:url,
				type:method,
				contentType:"application/json",
				data:jQuery("#parmTextarea").val(),
				success:function(r){
					console.log(r);
					$("#resultTextarea").val(JSON.stringify(r));
				},
				error:function(XMLHttpRequest, textStatus, errorThrown){
					console.log(XMLHttpRequest.responseText);
					$("#resultTextarea").val(XMLHttpRequest.responseText);
				}
			});
		}
	</script>
</head>
<style type="text/css">
.table{
	border-collapse:collapse;
	width:700px;
}
.table td,.table th{
	border:1px solid #ccc;
}
</style>
<body>
	<h3>提交参数</h3>
	<textarea id="parmTextarea" rows="8" style="width:95%;"></textarea><br></br>
	<input id="submit" type="button" value="提交"></input>
	<h3>返回结果</h3>
	<textarea id="resultTextarea" rows="8" style="width:95%;"></textarea>
</body>
</html>
